////////////////////////////////////////////////////////////////////////////////
//
//  Copyright (C) 2003-2006 Adobe Macromedia Software LLC and its licensors.
//  All Rights Reserved. The following is Source Code and is subject to all
//  restrictions on such code as contained in the End User License Agreement
//  accompanying this product.
//
////////////////////////////////////////////////////////////////////////////////

package mx.charts.series.renderData
{

import mx.charts.chartClasses.RenderData;

/**
 *  Represents all the information needed by the BarSeries to render.  
 */
public class BarSeriesRenderData extends RenderData
{
    include "../../../core/Version.as";

    //--------------------------------------------------------------------------
    //
    //  Constructor
    //
    //--------------------------------------------------------------------------

	/**
	 *  Constructor.
	 *
	 *	@param	cache	The list of BarSeriesItem objects representing the items in the dataProvider
	 *	@param	filteredCache	The list of BarSeriesItem objects representing the items in the dataProvider that remain after filtering.
	 *	@param	renderedBase	The horizontal position of the base of the bars, in pixels.
	 *	@param	renderedHalfWidth	Half the width of a bar, in pixels.
	 *	@param	renderedYOffset		The offset of each bar from its y value, in pixels.
	 */
	public function  BarSeriesRenderData(cache:Array = null,
										 filteredCache:Array = null,
										 renderedBase:Number = 0,
										 renderedHalfWidth:Number = 0,
										 renderedYOffset:Number = 0) 
	{		
		super(cache, filteredCache);

		this.renderedBase = renderedBase;
		this.renderedHalfWidth = renderedHalfWidth;
		this.renderedYOffset = renderedYOffset;
	}

    //--------------------------------------------------------------------------
    //
    //  Properties
    //
    //--------------------------------------------------------------------------

    //----------------------------------
	//  renderedBase
    //----------------------------------

	[Inspectable(environment="none")]

	/**
	 *  The horizontal position of the base of the bars, in pixels.
	 */
	public var renderedBase:Number;

    //----------------------------------
	//  renderedHalfWidth
    //----------------------------------

	[Inspectable(environment="none")]

	/**
	 *  Half the width of a bar, in pixels.
	 */
	public var renderedHalfWidth:Number;

    //----------------------------------
	//  renderedYOffset
    //----------------------------------

	[Inspectable(environment="none")]

	/**
	 *  The offset of each bar from its y value, in pixels.
	 */
	public var renderedYOffset:Number;

    //--------------------------------------------------------------------------
    //
    //  Methods
    //
    //--------------------------------------------------------------------------
	
	/**
	 *  @private
	 */
	override public function clone():RenderData
	{
		return new BarSeriesRenderData(cache, filteredCache, renderedBase,
									   renderedHalfWidth, renderedYOffset);
	}
}

}
